package com.mzw.huaxiarealestatebackend.service.impl;

import com.mzw.huaxiarealestatebackend.common.utils.DateFormat;
import com.mzw.huaxiarealestatebackend.dao.ScreenshotDao;
import com.mzw.huaxiarealestatebackend.entity.Screenshot;
import com.mzw.huaxiarealestatebackend.screen.ScheduledTask;
import com.mzw.huaxiarealestatebackend.service.ScreenshotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;

import javax.annotation.Resource;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.UUID;

/**
 * (Screenshot)表服务实现类
 *
 * @author makejava
 * @since 2024-01-05 14:08:00
 */
@Service("screenshotService")
public class ScreenshotServiceImpl implements ScreenshotService {
    @Resource
    private ScreenshotDao screenshotDao;

    /**
     * 添加信息
     * @param screenshot
     * @return
     */
    @Override
    public boolean save(Screenshot screenshot) {
        int insert = this.screenshotDao.insert(screenshot);
        return insert > 0;
    }

    /**
     * 查询所有
     * @return
     */
    @Override
    public List<Screenshot> queryAll() {
        return this.screenshotDao.selectList(null);
    }

}
